<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name=viewport content="width=device-width, initial-scale=1, minimal-ui">
    <title>MuJin</title>
    <script>
        var f = document.getElementById('f')
        var k = document.getElementById('k')
        var url = document.getElementById('url')
        function add() {
            f.action = '/add'
            k.value = ''
            f.submit()
        }
        window.onload = function() {
            if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
                var f = document.getElementById('f')
                var span = document.getElementById('span')
                f.removeChild(span)
            }
        }
    </script>
</head>
<body>
    <form id="f" action="/" method="POST" style="width: 100%;height: 33px;position: fixed;background-color: #fff;border-bottom: 1px solid #ccc;">
        <input type="text" id="k" name="k" value="<%=k%>">
        <input type="submit" value="查询">
        <input type="button" value="重置" onclick="javascript:location.href='/'">
        <span id="span">
        | <input type="text" id="url" name="url" value="" placeholder="手动交卷后的评分链接地址">
        <input type="button" value="扫描题目和答案" onclick="javascript:add()">
        </span>
    </form>
    <div style="height: 33px"></div>
    <% for(i in arr) { %>
    <p>第<%= i %>题：<%= arr[i]['问'] %></p>
    <p><%= arr[i]['答'] %></p>
    <hr>
    <% } %>
</body>
</html>